package UI;

import java.awt.event.ActionEvent;

public class LoginListener implements java.awt.event.ActionListener{
	public void actionPerformed(ActionEvent e){
		showDialog();
	}

public void showDialog(){
	javax.swing.JFrame jf=new javax.swing.JFrame("QQ");
	jf.setSize(250, 700);
	
	java.awt.FlowLayout fl=new java.awt.FlowLayout();
	jf.setLayout(fl);
	
	javax.swing.JMenuBar mb=new javax.swing.JMenuBar();

	javax.swing.JMenu m_file=new javax.swing.JMenu("File");
	javax.swing.JMenu m_help=new javax.swing.JMenu("Help");
	
    javax.swing.JMenuItem f_new=new javax.swing.JMenuItem("New");
    javax.swing.JMenuItem f_open=new javax.swing.JMenuItem("Open");
    javax.swing.JMenuItem f_save=new javax.swing.JMenuItem("Save");
    
    javax.swing.JMenuItem h_about=new javax.swing.JMenuItem("About");
    javax.swing.JMenuItem h_buy=new javax.swing.JMenuItem("Buy");
    javax.swing.JMenuItem h_sign=new javax.swing.JMenuItem("Sign in");   
    
    java.awt.event.ActionListener sign=new SignListener();
    h_sign.addActionListener(sign);
    
    java.awt.event.ActionListener about=new AboutListener();
    h_about.addActionListener(about);
    m_file.add(f_new);
    m_file.add(f_open);
    m_file.add(f_save);
    
    m_help.add(h_about);
    m_help.add(h_buy);
    m_help.add(h_sign);
    
    mb.add(m_file);
    mb.add(m_help);
    
    jf.setJMenuBar(mb);
	jf.setResizable(false);
	jf.setVisible(true);
}
}
